<layout name='Layout/layout_main' />
<tagLib name="html" />
	<script type="text/javascript">
		function save() {
			sendForm("form_data", "{:U('save')}&__URL__");
		}
                function select_user(){
                   var m = $.ligerDialog.open({ height: 600, url:"{:U('user/select_dept')}", width: 700, showMax: true, showToggle: true, showMin: true, isResize: true, modal: false, title: '选择用户',buttons: [ { text: '取消', onclick: function (item, dialog) { dialog.close(); } } ] });
                }
                $(document).ready(function(){
                    $('#customer_type').val('{$vo.customer_type}');
                    $('#biz_type').val('{$vo.biz_type}');;
                });
	</script>
   <div class="customer">
		<div class="row-fluid title"><span>编辑客户：{$vo.name}</span></div>
			<form method='post' id="form_data" class="row-fluid">
			<input type="hidden" name="opmode" value="edit">
                        <input type="hidden" name="id" value="{$vo.id}">
			<input type="hidden" name="ajax" id="ajax" value="1">
			<div class="row-fluid form_box">
				<div class="row-fluid form-horizontal">
					<div class="control-group span6">
						<label class="control-label" for="name">名称：</label>
						<div class="controls">
							<input type="text" id="name" name="name" value="{$vo.name}"></div>
					</div>
					<div class="control-group span6">
						<label class="control-label" for="customer_type">客户类型：</label>
						<div class="controls">
                                                    <select name="customer_type" id="customer_type"><option value="个人">个人</option><option value="企业">企业</option></select>
						</div>
					</div>
				</div>
				<div class="row-fluid form-horizontal">
                                        <div class="control-group span6">
						<label class="control-label" for="biz_type">证件类型</label>
						<div class="controls">
                                                    <select name="biz_type" id="biz_type"><option value="身份证">身份证</option><option value="驾驶证">驾驶证</option><option value="警官证">警官证</option></select>
					
                                                </div>
					</div>
					<div class="control-group span6">
						<label class="control-label" for="biz_license">证件号码</label>
						<div class="controls">
							<input type="text" id="biz_license" name="biz_license" value="{$vo.biz_license}">
                                                </div>
					</div>
                                </div>
                            <div class="row-fluid form-horizontal">
					<div class="control-group span6">
						<label class="control-label" for="payment">付款方式：</label>
						<div class="controls">
							<input type="text" id="payment" name="payment" value="{$vo.payment}"></div>
					</div>
                                    <div class="control-group span6">
						<label class="control-label" for="customer_lv">客户等级</label>
						<div class="controls">
							<input type="text" id="customer_lv" name="customer_lv" value="{$vo.customer_lv}">
                                                </div>
					</div>
				</div>
                                
                            
				<div class="row-fluid form-horizontal">
					<div class="control-group span6">
						<label class="control-label" for="address">地址</label>
						<div class="controls">
							<input type="text" id="address" name="address" value="{$vo.address}"></div>
					</div>
					<div class="control-group span6">
						<label class="control-label" for="salesman">业务员：</label>
						<div class="controls">
							<input type="text" id="salesman" name="salesman" readonly="readonly" value="{$vo.salesman}" > <input type="hidden" id="user_id" name="user_id"  value="{$vo.user_id}" /> <input type="button" onclick="select_user();" value="选择业务员" name="btn_select_dept" class="btn"></div>
					</div>
				</div>
				<div class="row-fluid form-horizontal">
					<div class="control-group span6">
						<label class="control-label" for="contact">联系人：</label>
						<div class="controls">
							<input type="text" id="contact" name="contact" value="{$vo.contact}"></div>
					</div>
					<div class="control-group span6">
						<label class="control-label" for="email">邮件：</label>
						<div class="controls">
							<input type="text" id="email" name="email" value="{$vo.email}" ></div>
					</div>
				</div>
 				<div class="row-fluid form-horizontal">
					<div class="control-group span6">
						<label class="control-label" for="office_tel">办公电话：</label>
						<div class="controls">
							<input type="text" id="office_tel" name="office_tel" value="{$vo.office_tel}" ></div>
					</div>
					<div class="control-group span6">
						<label class="control-label" for="mobile_tel">手机：</label>
						<div class="controls">
							<input type="text" id="mobile_tel" name="mobile_tel" value="{$vo.mobile_tel}"></div>
					</div>
				</div>
 				<div class="row-fluid form-horizontal">
					<div class="control-group span6">
						<label class="control-label" for="fax">传真：</label>
						<div class="controls">
							<input type="text" id="fax" name="fax" value="{$vo.fax}"></div>
					</div>
					<div class="control-group span6">
						<label class="control-label" for="im">即时聊天：</label>
						<div class="controls">
							<input type="text" id="im" name="im" value="{$vo.im}"></div>
					</div>
				</div>
                            <div class="row-fluid form-horizontal">
					<div class="control-group span6">
						<label class="control-label" for="car_number">车牌号码：</label>
						<div class="controls">
							<input type="text" id="car_number" name="car_number" value="{$vo.car_number}"></div>
					</div>
					<div class="control-group span6">
						<label class="control-label" for="oil_card">油卡号码：</label>
						<div class="controls">
							<input type="text" id="oil_card" name="oil_card" value="{$vo.oil_card}"></div>
					</div>
				</div>
 				<div class="row-fluid form-horizontal">
					<div class="control-group">
						<label class="control-label" for="fax">其他：</label>
						<div class="controls">
							<textarea  name="remark" rows="5" class="span12">{$vo.remark}</textarea>
					</div>
				</div>
				<div class="action">
					<input class="btn default" type="button" value="保存" onclick="save();">
					<input  class="btn" type="button" value="取消" onclick="go_return_url();">		
				</div>
                         </form>
                        </div>